package com.ruoyi.ams.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.ams.domain.AmsAssetScrap;
import com.ruoyi.ams.mapper.AmsAssetScrapMapper;
import com.ruoyi.ams.service.IAmsAssetScrapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 清理报废Service业务层处理
 * 
 * @author yfkj
 * @date 2022-05-16
 */
@Service
public class AmsAssetScrapServiceImpl extends ServiceImpl<AmsAssetScrapMapper, AmsAssetScrap>  implements IAmsAssetScrapService
{
    @Autowired
    private AmsAssetScrapMapper amsAssetScrapMapper;

    /**
     * 查询清理报废
     * 
     * @param scrapId 清理报废主键
     * @return 清理报废
     */
    @Override
    public AmsAssetScrap selectAmsAssetScrapByScrapId(Long scrapId)
    {
        return amsAssetScrapMapper.selectAmsAssetScrapByScrapId(scrapId);
    }

    /**
     * 查询清理报废列表
     * 
     * @param amsAssetScrap 清理报废
     * @return 清理报废
     */
    @Override
    public List<AmsAssetScrap> selectAmsAssetScrapList(AmsAssetScrap amsAssetScrap)
    {
        return amsAssetScrapMapper.selectAmsAssetScrapList(amsAssetScrap);
    }

    /**
     * 新增清理报废
     * 
     * @param amsAssetScrap 清理报废
     * @return 结果
     */
    @Override
    public int insertAmsAssetScrap(AmsAssetScrap amsAssetScrap)
    {
        return amsAssetScrapMapper.insertAmsAssetScrap(amsAssetScrap);
    }

    /**
     * 修改清理报废
     * 
     * @param amsAssetScrap 清理报废
     * @return 结果
     */
    @Override
    public int updateAmsAssetScrap(AmsAssetScrap amsAssetScrap)
    {
        return amsAssetScrapMapper.updateAmsAssetScrap(amsAssetScrap);
    }

    /**
     * 批量删除清理报废
     * 
     * @param scrapIds 需要删除的清理报废主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetScrapByScrapIds(Long[] scrapIds)
    {
        return amsAssetScrapMapper.deleteAmsAssetScrapByScrapIds(scrapIds);
    }

    /**
     * 删除清理报废信息
     * 
     * @param scrapId 清理报废主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetScrapByScrapId(Long scrapId)
    {
        return amsAssetScrapMapper.deleteAmsAssetScrapByScrapId(scrapId);
    }
}
